﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Sopha Product.aspx.cs" Inherits="Sopha_Product" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <asp:DataList ID="DataList1" runat="server" CellPadding="4" 
        DataKeyField="ProID" DataSourceID="SqlDataSource1" ForeColor="#333333" 
        RepeatColumns="5">
        <AlternatingItemStyle BackColor="White" />
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <ItemTemplate>
            <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Images") %>' />
            <br />
            ProID:
            <asp:Label ID="ProIDLabel" runat="server" Text='<%# Eval("ProID") %>' />
            <br />
            ProductName:
            <asp:Label ID="ProductNameLabel" runat="server" 
                Text='<%# Eval("ProductName") %>' />
            <br />
            Category:
            <asp:Label ID="CategoryLabel" runat="server" Text='<%# Eval("Category") %>' />
            <br />
            UnitPrice:
            <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
            <br />
            QuantityInStock:
            <asp:Label ID="QuantityInStockLabel" runat="server" 
                Text='<%# Eval("QuantityInStock") %>' />
            <br />
            <asp:TextBox ID="TextBox1" runat="server">1</asp:TextBox>
            <br />
            <asp:Button ID="Button1" runat="server" Text="Enter ShoppingCart" />
        </ItemTemplate>
        <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
    </asp:DataList>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SmartAccessoriesConnectionString %>" 
        SelectCommand="SELECT * FROM [Products] WHERE ([ProductName] = @ProductName)">
        <SelectParameters>
            <asp:Parameter DefaultValue="sopha" Name="ProductName" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

